Examples of Aggregate Qualifiers
These examples are made with the Sum - chart function function, but may be applied on all chart aggregation functions supporting set analysis definitions and the total qualifier.
Example 1:
Study the representation of a straight table below, depicting the logical state before any selections have been made:
Month | Group | Sum(Value) | sum(total Value) | sum({1} total Value) |
---|---|---|---|---|
- | - | 21 | 21 | 21 |
1 | A | 1 | 21 | 21 |
1 | B | 2 | 21 | 21 |
2 | A | 3 | 21 | 21 |
2 | B | 4 | 21 | 21 |
3 | A | 5 | 21 | 21 |
3 | B | 6 | 21 | 21 |
The second and third expression column have the same number in all rows. This number equals the calculated total in the first expression column.
Now, let's select months 1 and 2 only. The result is as follows:
Month (Filter: 1-2) | Group | Sum(Value) | sum(total Value) | sum({1} total Value) |
---|---|---|---|---|
- | - | 10 | 10 | 21 |
1 | A | 1 | 10 | 21 |
1 | B | 2 | 10 | 21 |
2 | A | 3 | 10 | 21 |
2 | B | 4 | 10 | 21 |
The result of the third expression (fifth column) remains unchanged because the set definition disregards current selections. The second expression (fourth column) with the total qualifier, shows the new total 10, which is still equivalent to the first expression total (third column).
Example 2:
Study the representation of a straight table below:
Month | Group | Sum(Value) | sum(total <Month> Value) | sum(total <Group> Value) |
---|---|---|---|---|
- | - | 21 | 21 | 21 |
1 | A | 1 | 3 | 9 |
1 | B | 2 | 3 | 12 |
2 | A | 3 | 7 | 9 |
2 | B | 4 | 7 | 12 |
3 | A | 5 | 11 | 9 |
3 | B | 6 | 11 | 12 |
In the third expression column (sum(total<Month> Val)) one total is calculated for each month.
In the fourth expression column (sum(total<Grp> Val)) one total is calculated for each group.